package com.financing.wap.dao.impl;

import java.util.List;
import com.financing.wap.dao.impl.BaseDaoImpl;
import com.financing.wap.dao.IFpFundCFDao;
import com.financing.wap.dto.FpFundBuynoticeDTO;
import com.financing.wap.dto.FpFundCFDTO;
import com.financing.wap.util.SqlName;
import java.sql.SQLException;
import java.util.Collections;

import org.springframework.stereotype.Repository;

/**
 * @Description:实现类
 * @author caojiayao
 * @version 1.0
 * @created 
 */
@Repository("fpFundCF")
public class FpFundCFDaoImpl extends BaseDaoImpl implements IFpFundCFDao {
	
	@Override
	public FpFundCFDTO getFpFundCF(Integer id) {
		return (FpFundCFDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.fpFundCF,id);
	}
	
	
	@Override
	public Integer insertFpFundCF(FpFundCFDTO dto) {
		return (Integer) this.getSqlMapClientTemplate().insert(SqlName.insertFpFundCF,dto);
	}

	
	@Override
	public Integer updateFpFundCF(FpFundCFDTO dto) {
		return (Integer) this.getSqlMapClientTemplate().update(SqlName.updateFpFundCF, dto);
	}
	
	@Override
	public Integer delFpFundCF(Integer id) {
		return (Integer) this.getSqlMapClientTemplate().delete(SqlName.delFpFundCF, id);
	}
	
	@Override
	public List<FpFundCFDTO> listFpFundCFByPage(FpFundCFDTO dto) {
		return (List<FpFundCFDTO>)this.getSqlMapClientTemplate().queryForList(SqlName.listFpFundCFByPage, dto);
	}
	
	@Override
	public List<FpFundCFDTO> listFpFundCF(FpFundCFDTO dto) {
		return (List<FpFundCFDTO>)this.getSqlMapClientTemplate().queryForList(SqlName.listFpFundCF, dto);
	}
	
	
	public Integer countFpFundCF(FpFundCFDTO dto){
		return (Integer)this.getSqlMapClientTemplate().queryForObject(SqlName.countFpFundCF, dto);
	}
	
	@Override
	public Class<FpFundCFDTO> getEntityClass() {
		return FpFundCFDTO.class;
	}
	
}
